<template>
  <div class="img-box"><img class="img" v-if="url" :src="url"><span v-else>未添加图片</span></div>
</template>

<script>
export default {
  props: {
    d: Object
  },
  computed: {
    url () {
      let { image, images } = this.d
      return image || (images && images[0])
    }
  }
}
</script>

<style scoped>
  .img-box {
    height: 100%;
  }
  .img {
    width: 100%;
    height: 100%;
    display: block;
  }
</style>
